package dailearn.feign.producer;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 *
 * @author daify
 * @date 2019-07-08 17:48
 **/
@Component
public class HystrixClientFactory implements FallbackFactory<ClientService> {
    @Override 
    public ClientService create(Throwable throwable) {
        return new ClientService() {
            @Override 
            public String getService() {
                return "use factory fallback";
            }
        };
    }
}
